﻿<style>
    .modal-body .table thead tr {
        display: block;
    }
</style>

<div class="modal-header">
    <button type="button" class="close" ng-disabled="loadingState" ng-click="close();"><span aria-hidden="true">&times;</span></button>
    <h3>
        <i class="fa fa-file-text-o"></i>
        考场详情
        <small>考场：{{data.examRoomName}}</small>
    </h3>
</div>

<div class="modal-body">
    <table style="margin-bottom: 0;" class="table responsive table-hover table-condensed">
        <tbody>
        <tr class="active">
            <th style="width: 4%;" class="text-center">#</th>
            <th style="width: 16%;" class="text-center">考生姓名</th>
            <th style="width: 16%;" class="text-center">准考证号</th>
            <th style="width: 16%;" class="text-center">完成时间</th>
            <th style="width: 16%;" class="text-center">完成状态</th>
            <th style="width: 16%;" class="text-center">备注</th>
            <th class="text-center">理由</th>
        </tr>
        </tbody>
    </table>

    <div style="max-height: 280px; overflow-y: scroll;">
        <table class="table responsive table-hover table-condensed" ng-show="list.length > 0">
            <tbody ng-repeat="item in list">
            <tr>
                <!--序号-->
                <td style="width: 4%;" class="text-center" rowspan="{{list[$index].behavior.length}}">
                    {{$index+1}}
                </td>
                <!--考生姓名-->
                <td style="width: 16%;" class="text-center" rowspan="{{list[$index].behavior.length}}">
                    {{item.examineeName}}
                </td>
                <!--准考证号-->
                <td style="width: 16%;" class="text-center" rowspan="{{list[$index].behavior.length}}">
                    {{item.examCardNo}}
                </td>
                <!--完成时间-->
                <td style="width: 16%;" class="text-center" rowspan="{{list[$index].behavior.length}}" ng-switch on="item.sysState">
                    <span ng-switch-default></span>
                    <span ng-switch-when="3">{{item.examEndTime | formatDate | date: 'yyyy-MM-dd HH:mm:ss'}}</span>
                </td>
                <!--完成状态-->
                <td style="width: 16%;" class="text-center" rowspan="{{list[$index].behavior.length}}" ng-switch on="item.sysState">
                    <span ng-switch-default>异常状态</span>
                    <span ng-switch-when="0">未开考</span>
                    <span ng-switch-when="1">已登录</span>
                    <span ng-switch-when="2">已开考未交卷</span>
                    <span ng-switch-when="3">已交卷</span>
                    <span ng-switch-when="4">作废</span>
                    <span ng-switch-when="5">试卷下载完成</span>
                    <span ng-switch-when="6">意外处理作废</span>
                </td>
                <!--备注-->
                <td style="width: 16%;">
                    {{item.behavior[0].memo}}
                </td>
                <!--理由-->
                <td style="width: 16%;">
                    {{item.behavior[0].reason}}
                </td>
            </tr>
            <tr ng-repeat="subItem in item.behavior|formatUnFirst:1">
                <td style="width: 16%;">
                    {{subItem.memo}}
                </td>
                <td style="width: 16%;">
                    {{subItem.reason}}
                </td>
            </tr>
            </tbody>
        </table>
    </div>

    <h3 class="text-center" ng-show="list.length <= 0">
        <img src="//openexamcdn.open.com.cn/openexam/static/App/images/nodata.jpg" alt="" />
        <!--<small>对不起，没有相关数据！</small>-->
    </h3>
</div>
